package com.lej.dataservice.club.bean.main.home

/**
 *  author: cjq
 *  date  : 2022/7/18 0018
 *  desc  :
 *
 *  {
"data": {
"cover": "nft展示图",
"name": "nft名",
"nft_type": "1 图片 2 音频 3 视频 4模型",
"author": "创作者",
"fee": "优惠后价格（分）",
"price": "标准价格（无优惠价格）（分）",
"price_unit": "数字藏品单位",
"pay_info_id": "下单用信息id",
"stock": "库存",
"per_user_limit": "限购数量，0不限购",
"per_user_limit_current": "当前用户还可购买数量"
}
}
 */
data class PayDetailInfo(
    val cover: String?,
    val name: String?,
    val nft_type: Int?,
    val author: String?,
    val price: Int?,
    val price_unit: String?,
    val pay_info_id: Int?,
    val stock: Int?,
    val per_user_limit: Int?,
    val per_user_limit_current: Int?
) {
    fun isLimit() = per_user_limit != 0
    fun getNftType() = when (nft_type) {
        1 -> "图片"
        2 -> "音频"
        3 -> "视频"
        4 -> "模型"
        else -> "图片"
    }
}
